﻿CKEDITOR.dialog.add('select',function(editor){ 
    return {
        title: editor.lang.uflo.textfield.title,
        minWidth: 320,
        minHeight: 150,
        contents: [{
            id: 'info',
            label: editor.lang.uflo.textfield.title,
            title: editor.lang.uflo.textfield.title,
            elements: [
				{
                    id: 'bindingfield',
                    type: 'select',
					style:"width:320px",
                    label: editor.lang.uflo.textfield.bindingfiled,
                    'default': '',
					items: window.formTable.getMasterColumns(),
					setup:function(widget){
						var element=widget.element;
						var bindingfield=element.getAttribute("bindingfield");
						if(bindingfield){
							this.setValue(bindingfield);
						}
					},
                    commit:function(widget){
						widget.setData("bindingfield",this.getValue());
					}    
	        	},
				{
                    id: 'width',
                    type: 'text',
					style:"width:320px",
                    label: editor.lang.uflo.textfield.charWidth,
                    'default': '100%',
					setup:function(widget){
						var element=widget.element;
						var width=element.getAttribute("width");
						if(width){
							this.setValue(width);
						}
					},
                    commit:function(widget){
						widget.setData("width",this.getValue());
					}  
				}
			]
        }]
    };
});
